summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-12-25 01:30:16 +0100
committerLiam <byteslice@airmail.cc>2023-12-25 01:36:42 +0100
commit47e44a6693ad2e8c7fbdaa23ed440d9780e1d54b (patch)
treee5102e449dbec63dda46188ea2fe98691caef857
parentkernel: remove unecessary process member from handle table (diff)
downloadyuzu-47e44a6693ad2e8c7fbdaa23ed440d9780e1d54b.tar
yuzu-47e44a6693ad2e8c7fbdaa23ed440d9780e1d54b.tar.gz
yuzu-47e44a6693ad2e8c7fbdaa23ed440d9780e1d54b.tar.bz2
yuzu-47e44a6693ad2e8c7fbdaa23ed440d9780e1d54b.tar.lz
yuzu-47e44a6693ad2e8c7fbdaa23ed440d9780e1d54b.tar.xz
yuzu-47e44a6693ad2e8c7fbdaa23ed440d9780e1d54b.tar.zst
yuzu-47e44a6693ad2e8c7fbdaa23ed440d9780e1d54b.zip
-rw-r--r--src/core/hle/service/am/am.cpp6
-rw-r--r--src/core/hle/service/hle_ipc.h4
-rw-r--r--src/core/hle/service/jit/jit.cpp2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index dabec1119..97eb56ff0 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -1523,8 +1523,7 @@ void ILibraryAppletCreator::CreateTransferMemoryStorage(HLERequestContext& ctx)
}
std::vector<u8> memory(transfer_mem->GetSize());
- system.ApplicationMemory().ReadBlock(transfer_mem->GetSourceAddress(), memory.data(),
- memory.size());
+ ctx.GetMemory().ReadBlock(transfer_mem->GetSourceAddress(), memory.data(), memory.size());
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(ResultSuccess);
@@ -1556,8 +1555,7 @@ void ILibraryAppletCreator::CreateHandleStorage(HLERequestContext& ctx) {
}
std::vector<u8> memory(transfer_mem->GetSize());
- system.ApplicationMemory().ReadBlock(transfer_mem->GetSourceAddress(), memory.data(),
- memory.size());
+ ctx.GetMemory().ReadBlock(transfer_mem->GetSourceAddress(), memory.data(), memory.size());
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(ResultSuccess);
diff --git a/src/core/hle/service/hle_ipc.h b/src/core/hle/service/hle_ipc.h
index 69a3cce36..40d86943e 100644
--- a/src/core/hle/service/hle_ipc.h
+++ b/src/core/hle/service/hle_ipc.h
@@ -360,6 +360,10 @@ public:
return *thread;
}
+ [[nodiscard]] Core::Memory::Memory& GetMemory() const {
+ return memory;
+ }
+
template <typename T>
Kernel::KScopedAutoObject<T> GetObjectFromHandle(u32 handle) {
auto obj = client_handle_table->GetObjectForIpc(handle, thread);
diff --git a/src/core/hle/service/jit/jit.cpp b/src/core/hle/service/jit/jit.cpp
index 8648c76fa..a94d05e19 100644
--- a/src/core/hle/service/jit/jit.cpp
+++ b/src/core/hle/service/jit/jit.cpp
@@ -26,7 +26,7 @@ public:
explicit IJitEnvironment(Core::System& system_, Kernel::KProcess& process_, CodeRange user_rx,
CodeRange user_ro)
: ServiceFramework{system_, "IJitEnvironment"}, process{&process_},
- context{system_.ApplicationMemory()} {
+ context{process->GetMemory()} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &IJitEnvironment::GenerateCode, "GenerateCode"},